import type { IContentConfig } from '@/components/types'

export const contentConfig: IContentConfig = {
  category: 'system',
  pageName: 'menu',
  isHidePagination: true,
  header: {
    title: '菜单列表',
    btnContent: '新建菜单'
  },
  propItems: [
    {
      label: '菜单名称',
      prop: 'name',
      width: '150px',
      align: 'center'
    },
    {
      label: '级别',
      prop: 'type',
      width: '80px',
      align: 'center'
    },
    {
      label: '菜单url',
      prop: 'url',
      width: '220px',
      align: 'center'
    },
    {
      label: '图标icon',
      prop: 'icon',
      width: '150px',
      align: 'center'
    },
    {
      type: 'normal',
      label: '权限',
      prop: 'permission',
      width: '220px',
      align: 'center'
    },

    { type: 'timer', label: '创建时间', prop: 'createdAt', align: 'center' },
    { type: 'timer', label: '更新时间', prop: 'updatedAt', align: 'center' },

    { type: 'operation', label: '操作', width: '180px' }
  ],
  childrenTree: {
    rowKey: '_id',
    treeProps: {
      children: 'children'
    }
  }
}
